package cn.xyhelp.shop.mall.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品分类
 * </p>
 *
 * @author violetfreesia
 * @since 2022-02-15
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("category")
public class Category extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 类别名称
     */
    @TableField("name")
    private String name;

    /**
     * 父分类
     */
    @TableField("pid")
    private Integer pid;

    /**
     * 分类的路径，各级id以逗号分割
     */
    @TableField("path")
    private String path;

    /**
     * 分类等级
     */
    @TableField("level")
    private Integer level;

    /**
     * 类别图像
     */
    @TableField("img_url")
    private String imgUrl;

    /**
     * 是否为叶子节点
     */
    @TableField("leaf")
    private Integer leaf;

    @TableField("store_id")
    private Integer storeId;


}
